﻿using Flurl.Http;
using Modules.Units;
using Sorting.App.Models;
using Sorting.App.Models.Entity;

namespace Sorting.App.Services;

/// <summary>
/// 任务日志服务
/// </summary>
public class SysLogService
{


    ServiceApis serviceApis = new ServiceApis();


    /// <summary>
    /// 查找系统日志查询
    /// </summary>
    /// <returns></returns>
    public async Task<List<SysLogDto>> GetSysLogDtos()
    {

        var res = await serviceApis.GetSysLogApi
                   .WithOAuthBearerToken(AppsettingUnits.Token)
                   .PostAsync()
                   .ReceiveJson<ResfulModel<List<SysLogDto>>>();

        return res.data;
    }
}